home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
geos-archive
/
GEOS-D64
/
GeoThek Programme (19xx)(-)(de)[gt126b].d64
/
ramlink install
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
5KB
|
246 lines
100 XT=49152
110 RL=0:ID=PEEK(186)
120 DIM FP%(32)
130 DIM FP$(32)
199 :
200 T0$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][155]"
999 :
1000 POKE53280,0:POKE53281,0
1010 PRINT"[144][147][155]RAMLINK INSTALLATION 1.0"
1020 PRINTT0$
1030 GOSUB29000
1040 GOSUB30000
1050 GOSUB31000
1060 PRINT"[144][147][155]RAMLINK INSTALLATION 1.0"
1070 PRINTT0$
1099 :
1100 PRINT"1. ";:GOSUB60000
1110 PRINT"2. ";:GOSUB50000
1120 PRINT"3. ";:GOSUB60200
1130 PRINT"4. ";:GOSUB40000
1140 PRINT"5. ";:GOSUB60100
1150 PRINT"6. ";:GOSUB44000
1160 PRINT"[155][147]INSTALLATION COMPLETE !"
1170 PRINTT0$
1180 PRINT"ALL DONE!"
1190 END
1199 :
29000 REM LAUFWERK WAEHLEN
29010 PRINT"[144][147][155]RAMLINK INSTALLATION 1.0"
29020 PRINTT0$
29030 PRINT "LOAD 'RL.INI'-FILE FROM DRIVE ";ID
29040 POKE198,0:INPUT "[145]";A0
29050 IF A0>=8 AND A0<=31 THEN 29070
29060 GOTO 29040
29070 OPEN15,A0,15:CLOSE15
29080 IF ST<>0 THEN 29040
29099 :
29100 PRINT"[144][147][155]RAMLINK INSTALLATION 1.0"
29110 PRINTT0$
29120 ID=A0:RETURN
29999 :
30000 REM GET RAMLINK-DEVICE
30010 PRINT" SEARCHING FOR RAMLINK..."
30020 A0=8:RL=0
30030 POKE144,0:OPEN15,A0,15:CLOSE15:IFST<>0THENGOTO30090
30040 A$="":OPEN15,A0,15
30050 PRINT#15,"M-R"+CHR$(160)+CHR$(254)+CHR$(6)
30060 FORI=1TO6:GET#15,B$:A$=A$+B$:NEXT
30070 CLOSE15
30080 IFA$="CMD RL"THEN30200
30090 A0=A0+1:IFA0<32THEN30030
30100 PRINT"[155][147]INSTALLATION ERROR !"
30110 PRINTT0$
30120 PRINT"RAMLINK NOT AVAILABLE !"
30130 END
30199 :
30200 RL=A0
30210 PRINT"[144][147][155]RAMLINK INSTALLATION 1.0":PRINTT0$
30220 RETURN
30299 :
31000 REM SEARCHING FOR RL.INI
31010 PRINT" SEARCHING FOR FILE 'RL.INI'..."
31020 POKE144,0:OPEN15,ID,15:CLOSE15
31030 IF(ST<>0)THEN31130
31099 :
31100 OPEN15,ID,15,"R0:RL.INI=RL.INI"
31110 INPUT#15,A0,A$,A$,A$
31120 CLOSE15:IFA0=63THENRETURN
31130 PRINT"[155][147]INSTALLATION ERROR !"
31140 PRINTT0$
31150 PRINT"CAN'T FIND FILE 'RL.INI' OR DRIVE"ID"[157]:"
31160 PRINT"IS NOT CONNECTED !"
31170 END
31999 :
40000 REM CREATE PARTITIONS
40010 PRINT"CREATE PARTITION TABLE..."
40020 OPEN15,ID,15,"R0:RL.INI=RL.INI"
40030 INPUT#15,A0,A$,A$,A$
40040 CLOSE15:IFA0=63THEN40100
40050 PRINT"[155][147]INSTALLATION ERROR !"
40060 PRINTT0$
40070 PRINT"CAN'T FIND FILE 'RL.INI'!"
40090 END
40099 :
40100 OPEN2,ID,2,"RL.INI,U,R"
40110 IF(ST=0)THENGOSUB41000:GOTO40110
40120 CLOSE2
40130 PRINT " [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
40140 PRINT" "RIGHT$("00"+MID$(STR$(PA),2),2)" PARTITIONS CREATED."
40150 PRINT" "RIGHT$("00000"+MID$(STR$(MX),2),5)" FREE BLOCKS LEFT."
40160 RETURN
40199 :
40200 PRINT"[155][147]INSTALLATION ERROR !"
40210 PRINTT0$
40220 PRINT"DATA-ERROR IN 'RL.INI'-FILE !"
40230 END
40999 :
41000 INPUT#2,PN,PT,PN$,PS
41010 IFPN<1ORPN>31THEN40200
41099 :
41100 IFPT= 0THEN40200
41110 IFPT= 5THEN40200
41120 IFPT= 6THEN40200
41130 IFPT> 7THEN40200
41199 :
41200 PN$=LEFT$(PN$,16)
41210 IFLEN(PN$)=16THEN41300
41220 PN$=PN$+CHR$(160)
41230 GOTO41210
41299 :
41300 IFPT=1THENPS=PS
41310 IFPT=2THENPS=683
41320 IFPT=3THENPS=1366
41330 IFPT=4THENPS=3200
41340 IFPT=7THENPS=PS
41350 IFPS=-1THENPS=INT(MX/256)*256
41360 PRINT" * "PN$" => ";
41399 :
42000 IF(MX-PS)<0THEN42200
42010 BA=XT+256+PN*32+2
42020 ZH=INT(SA/(256^2))
42030 ZM=INT((SA-ZH)/256)
42040 ZL=SA-((ZH*256^2)+(ZM*256))
42050 SH=INT(PS/(256^2))
42060 SM=INT((PS-SH)/256)
42070 SL=PS-((SH*256^2)+(SM*256))
42080 A$=CHR$(PT)+CHR$(0)+CHR$(0)+PN$
42090 A$=A$+CHR$(ZH)+CHR$(ZM)+CHR$(ZL)
42100 A$=A$+CHR$(0)+CHR$(0)+CHR$(0)
42110 A$=A$+CHR$(0)+CHR$(0)
42120 A$=A$+CHR$(SH)+CHR$(SM)+CHR$(SL)
42130 IFPEEK(BA)<>0THEN42200
42140 FORA0=0TO29
42150 POKEBA+A0,ASC(MID$(A$,1+A0,1))
42160 NEXT
42170 GOTO42300
42200 PRINT"CANCELLED !"
42210 RETURN
42299 :
42300 PRINT"OK !"
42310 SA=SA+PS:MX=MX-PS:PA=PA+1
42320 IFPT=1THENGOSUB43000
42330 IFPT=2THENGOSUB43000
42340 IFPT=3THENGOSUB43000
42350 IFPT=4THENGOSUB43000
42360 RETURN
42999 :
43000 FP%(PA)=PN:FP$(PA)=PN$:RETURN
43099 :
44000 REM FORMAT PARTITIONS
44010 PRINT"FORMATTING PARTITIONS..."
44020 FORA0=1TO31
44030 IFFP%(A0)=0THEN44080
44040 A$=RIGHT$("00"+MID$(STR$(FP%(A0)),2),2)
44050 OPEN15,RL,15,"UJ:"
44060 PRINT#15,"N"+A$+":"+FP$(A0)+",RL"
44070 INPUT#15,A$,B$,C$,D$:CLOSE15
44080 NEXT
44090 RETURN
44099 :
50000 REM GET RAMLINK-SIZE
50010 PRINT"TESTING RAMLINK-SIZE..."
50020 BA=XT+256
50030 SA=0
50040 BH=PEEK(BA+21):SH=PEEK(BA+29)
50050 BM=PEEK(BA+22):SM=PEEK(BA+30)
50060 BL=PEEK(BA+23):SL=PEEK(BA+31)
50070 OS=BH*256^2+BM*256+BL
50080 SI=SH*256^2+SM*256+SL
50090 MX=OS-SA
50099 :
50100 MM=OS+SI
50110 PRINT" (MEMORY LOCATED: ";
50120 PRINTRIGHT$("00000"+MID$(STR$(INT(MM/4)),2),5)" KBYTES)"
50130 RETURN
59990 END
60000 REM READ PARTITION TABLE
60010 PRINT"READING PARTITION TABLE..."
60020 TR=1:AD=XT+256
60030 FORSE=0TO4
60040 GOSUB61000
60050 AD=AD+256
60060 NEXT
60070 RETURN
60099 :
60100 REM WRITE PARTITION TABLE
60110 PRINT"WRITING PARTITION TABLE..."
60120 TR=1:AD=XT+256
60130 FORSE=0TO4
60140 GOSUB61100
60150 AD=AD+256
60160 NEXT
60170 RETURN
60199 :
60200 REM CLEAR PARTITION TABLE
60210 PRINT"CLEARING PARTITION TABLE..."
60220 FORA0=XT+256+32TOXT+256+255
60230 POKEA0,0:NEXT
60240 FORA0=2TO4:FORA1=2TO255
60250 POKEXT+A0*256+A1,0
60260 NEXT:NEXT
60270 RETURN
60299 :
61000 REM READ SECTOR TO BUFFER
61010 SYS57513
61020 POKE56865,TR:POKE56866,SE
61030 POKE56867,AD-(INT(AD/256)*256)
61040 POKE56868,INT(AD/256)
61050 POKE56869,255:POKE56864,128
61060 SYS65057
61070 RETURN
61099 :
61100 REM WRITE BUFFER TO SEKTOR
61110 SYS57513
61120 POKE56865,TR:POKE56866,SE
61130 POKE56867,AD-(INT(AD/256)*256)
61140 POKE56868,INT(AD/256)
61150 POKE56869,255:POKE56864,144
61160 SYS65057
61170 RETURN
61199 :
62000 REM CREATE PARTITIONS
63000 REM NOT CREATED
63010 FORA0=0TO30:B%(A0)=0:NEXT
63020 B%(0)=0:RETURN
63099 :
63100 REM NATIVE-MODE
63110 FORA0=0TO30:B%(A0)=0:NEXT
63120 B%(0)=1:RETURN
63199 :
63200 REM 1541 EMULATION-MODE
63210 FORA0=0TO30:B%(A0)=0:NEXT
63220 B%(0)=2:RETURN
63299 :
63300 REM 1571 EMULATION-MODE
63310 FORA0=0TO30:B%(A0)=0:NEXT
63320 B%(0)=3:RETURN
63399 :
63400 REM 1581 EMULATION-MODE
63410 FORA0=0TO30:B%(A0)=0:NEXT
63420 B%(0)=4:RETURN
63499 :
63700 REM DACC
63710 FORA0=0TO30:B%(A0)=0:NEXT
63720 B%(0)=7:RETURN